{include file='yxworker/w_head2'}

        <script src="{$_G['URL']['WORKER_CSS']}js/lCalendar.js"></script>
        <link rel="stylesheet" href="{$_G['URL']['WORKER_CSS']}css/lCalendar.css">
        <header class="order_header" style="font-size: 0.4rem;">
            <div class="go_back">
                <a style="color: #ffffff" href="/{php echo createMobileUrl('w_index',array('themeid'=>$themeid));}">
                <img src="{$_G['URL']['WORKER_CSS']}images/order_03.png">
                返回首页</a>
            </div>
            数据统计
        </header>  
        <style type="text/css">
            input {
                width: 70%;
                height: 0.4rem;
                font-size: 0.18rem;
                border: 1px solid #19b5ee;
                border-radius: 5px;
                margin-top: 0.05rem;
                padding: 0.05rem 0.1rem;
                display: inline-block;
            }
            .lmsz_cont .itemnew p {
                height: 0.4rem;
                line-height: 0.4rem;
                font-size: 0.22rem;
                width: 22%;
                text-align: right;
                display: inline-block;
            }
            .lmsz_cont .itemnew {
                /* border-bottom: 1px solid #dedddd; */
                /* height: 1.1rem; */
                padding-top: 0.2rem;
            }
        </style>

        <form action="/{php echo createMobileUrl('w_tongji',array('themeid'=>$themeid,'op'=>'search'));}" method="post"> 
            <div class="lmsz_cont">
                <div class="itemnew">
                    <p>开始时间: </p>
                    <input id="demo1" type="text" readonly="" name="starttime" placeholder="开始时间" data-lcalendar="{php echo date('Y')-1;}-01-01,{php echo date('Y')+1;}-12-31" value="{$starttime}" />
                </div>
                <div class="itemnew">
                    <p>结束时间: </p>
                    <input id="demo2" type="text" readonly="" name="endtime" placeholder="结束时间" data-lcalendar="{php echo date('Y')-1;}-01-01,{php echo date('Y')+1;}-12-31" value="{$endtime}" />
                </div>
                <div style="text-align: center;">
                <button class="l_btn" type="sumbit">搜索</button>
                </div>
            </div>
        </form>
        <div style="height: 30px;"></div>
{if $op == 'search' }

        <div class="s_items" style="text-align: center;padding-bottom: 10px">
                成交总计: <span style="color: #198bcb;width: 20%;">{$zongshu['record']}</span> 
                线下总计: <span style="color: #198bcb;width: 20%;">{$zongshu['recordxx']}</span> 
                线上实收总计: <span style="color: #198bcb;width: 20%;">{$zongshu['fee']}</span> 
        </div>
    {if $system['ruanjian']==3 && $config['showshop']==0 }
        <div class="s_items">
            <div class="s_title" >
                <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
                联盟商排行
            </div>
            <!--  -->
            <table class="lm_table" >
                <thead  style="background-color:#ffffff">
                    <tr>
                        <td style="width: 2%;"></td>
                        <td style="width: 5%;color: #198bcb; text-align: right;">排名</td>
                        <td style="color: #198bcb;width: 20%;">联盟商</td>
                        <td style="width: 20%;">线上成交</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td style="width: 20%;">线下</td>
                        {/if}
                        <td style="width: 20%;">线上实收</td>
                        <td style="width: 2%;"></td>
                    </tr>
                </thead>
                <tbody>
                    {loop $companylist $index $item}
                    <tr>
                        <td> </td>
                        <td style="text-align: right;"><span>{php echo $index+1;}</span></td>
                        <td style="color: #198bcb">{php echo mb_substr($item['name'],0,4,'utf-8');}</td>
                        <td style="color: #198bcb">{$item['record']}</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td>{$item['recordxx']}</td>
                        {/if}
                        <td style="color: #198bcb">{$item['fee']}</td>
                        <td> </td>
                    </tr>
                    {/loop}                    
                </tbody>
            </table>
        </div>
    {/if}

        <div class="s_items">
            <div class="s_title" >
                <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
                {php echo empty($shop)?'':mb_substr($shopname,0,4,'utf-8').'-';}团队排行
            </div>
            <!--  -->
            <table class="lm_table" >
                <thead  style="background-color:#ffffff">
                    <tr>
                        <td style="width: 2%;"></td>
                        <td style="width: 5%;color: #198bcb; text-align: right;">排名</td>
                        <td style="color: #198bcb;width: 20%;">团队</td>
                        <td style="width: 20%;">线上成交</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td style="width: 20%;">线下</td>
                        {/if}
                        <td style="width: 20%;">线上实收</td>
                        <td style="width: 2%;"></td>
                    </tr>
                </thead>
                <tbody>
                    {loop $teamlist $index $item}
                    <tr>
                        <td> </td>
                        <td style="text-align: right;"><span>{php echo $index+1;}</span></td>
                        <td style="color: #198bcb">{php echo mb_substr($item['name'],0,4,'utf-8');}</td>
                        <td style="color: #198bcb">{$item['record']}</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td>{$item['recordxx']}</td>
                        {/if}
                        <td style="color: #198bcb">{$item['fee']}</td>
                        <td> </td>
                    </tr>
                    {/loop}                    
                </tbody>
            </table>
        </div>


        <div class="s_items">
            <div class="s_title" >
                <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
                {php echo empty($shop)?'':mb_substr($shopname,0,4,'utf-8').'-';}个人排行
            </div>
            <!--  -->
            <table class="lm_table" >
                <thead  style="background-color:#ffffff">
                    <tr>
                        <td style="width: 2%;"></td>
                        <td style="width: 5%;color: #198bcb; text-align: right;">排名</td>
                        <td style="color: #198bcb;width: 20%;">团队</td>
                        <td style="width: 20%;">线上成交</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td style="width: 20%;">线下</td>
                        {/if}
                        <td style="width: 20%;">线上实收</td>
                        <td style="width: 2%;"></td>
                    </tr>
                </thead>
                <tbody>
                    {loop $workerlist $index $item}
                    <tr>
                        <td> </td>
                        <td style="text-align: right;"><span>{php echo $index+1;}</span></td>
                        <td style="color: #198bcb">{php echo mb_substr($item['name'],0,4,'utf-8');}</td>
                        <td style="color: #198bcb">{$item['record']}</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td>{$item['recordxx']}</td>
                        {/if}
                        <td style="color: #198bcb">{$item['fee']}</td>
                        <td> </td>
                    </tr>
                    {/loop}                    
                </tbody>
            </table>
        </div>
{else}
    <div class="s_items">
        <div class="s_title">
            <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
            数据统计【{$_P['m']}】
        </div>
            <table class="s_table" style="font-size: 14px;">
                <thead>
                    <tr>
                        <td style="text-align: right;">参与人数：</td>
                        <td style="text-align: left; color: #3980c3">{$fanscount}</td>
                        <td style="text-align: right;">付款金额：</td>
                        <td style="text-align: left; color: #ab17cb">{$ordercount}元</td>
                    </tr>
                </thead>
                <thead>
                    <tr>
                        <td style="text-align: right;">浏&nbsp;&nbsp;览&nbsp;&nbsp;量：</td>
                        <td style="text-align: left; color: #52af52">{$theme['scansum']}</td>
                        {if $system['fenxiao']==1 || $commcount != 0}
                        <td style="text-align: right;">红包发放：</td>
                        <td style="text-align: left; color: #d44946">{$commcount}元</td>
                        {else}
                        <td style="text-align: right;">手续费：</td>
                        <td style="text-align: left; color: #d44946">{php echo sprintf("%.2f",$ordercount*$shouxu2);}元</td>
						{/if}
                    </tr>
                </thead>
                <thead>
                    <tr>
                        <td style="text-align: right;">转&nbsp;&nbsp;发&nbsp;&nbsp;量：</td>
                        <td style="text-align: left; color: #50b8d9">{$theme['forward']}</td>
                        {if $theme['chongzhi']>0 }
	                        <td style="text-align: right;">充&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;值：&nbsp;</td>
	                        <td style="text-align: left; color: #eabc2b">{$theme['chongzhi']}元</td>
                        {else}
	                        <td style="text-align: right;">已&nbsp;&nbsp;提&nbsp;&nbsp;现：</td>
	                        <td style="text-align: left; color: #eabc2b">{$theme['chongzhi']}元</td>
                        {/if}
                    </tr>
                </thead>
                <thead>
                    <tr>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td style="text-align: right;">线上/线下：</td>
                        <td style="text-align: left; color: #263e88"><span style="color: #b11a7b">{$recordcount}</span> / {$recordxxcount}</td>
                        {else}
                        <td style="text-align: right;">付款人数：</td>
                        <td style="text-align: left; color: #b11a7b">{$recordcount}</td>
                        {/if}
                        <td style="text-align: right;">实际到帐：</td>
                        <td style="text-align: left; color: #188041">{php echo sprintf("%.2f",$ordercount*$shouxu+$commcount+$theme['chongzhi']);}元</td>
                    </tr>
                </thead>
            </table>

    </div>
    {if !empty($config['shops'])}
    <div class="s_items">
        <div class="s_title">
            <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
            {$config['shops']}统计
        </div>
            <table class="s_table">
                <thead>
                    <tr>
                        <td style="width: 50%">{$config['shops']}</td>
                        <td>数量</td>
                    </tr>
                </thead>
                <tbody>
                	{$options}
                </tbody>
            </table>

    </div>
    {/if}
    {if $system['ruanjian']==3 && $config['showshop']==0 }
        <div class="s_items">
            <div class="s_title" >
                <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
                联盟商总排行{if !empty($notworker)}【{$notworker}个定单无客服】{/if}
            </div>
            <!--  -->
            <table class="lm_table" >
                <thead  style="background-color:#ffffff">
                    <tr>
                        <td style="width: 2%;"></td>
                        <td style="width: 5%;color: #198bcb; text-align: right;">排名</td>
                        <td style="color: #198bcb">联盟商</td>
                        <td style="width: 10%;"><a {if $paixu!='xfs'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_shoprank',array('themeid'=>$themeid,'paixu'=>'xfs'));}">新粉</a></td>
                        <td style="width: 10%;"><a {if $paixu!='zf'}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_shoprank',array('themeid'=>$themeid,'paixu'=>'zf'));}">转发</a></td>
                        <td style="width: 10%;"><a {if $paixu!='ll'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_shoprank',array('themeid'=>$themeid,'paixu'=>'ll'));}">浏览</a></td>
                        <td style="width: 10%;"><a {if $paixu!=''}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_shoprank',array('themeid'=>$themeid,));}">成交</a></td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td style="width: 10%;"><a {if $paixu!='xx'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_shoprank',array('themeid'=>$themeid,'paixu'=>'xx'));}">线下</a></td>
                        {/if}
                        <td style="width: 10%;"><a {if $paixu!='fee'}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_shoprank',array('themeid'=>$themeid,'paixu'=>'fee'));}">实收</a></td>
                        {if $myworker['level'] == '1' }
                        <td style="color: #198bcb">明细</td>
                        {/if}
                        <td style="width: 2%;"></td>
                    </tr>
                </thead>
                <tbody>
                    {loop $companylist $index $item}
                    <tr>
                        <td> </td>
                        <td style="text-align: right;"><span>{php echo $index+1;}</span></td>
                        <td style="color: #198bcb">{php echo mb_substr($item['name'],0,4,'utf-8');}</td>
                        <td >{$item['newfans']}</td>
                        <td style="color: #198bcb">{$item['forward']}</td>
                        <td >{$item['scansum']}</td>
                        <td style="color: #198bcb">{$item['record']}</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td>{$item['recordxx']}</td>
                        {/if}
                        <td style="color: #198bcb">{$item['fee']}</td>
                        {if $myworker['level'] == '1' }
                        <td><a style="color: #198bcb;" href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$item['company']));}">查看</a></td>
                        {/if}
                        <td> </td>
                    </tr>
                    {/loop}                    
                </tbody>
            </table>
        </div>
    {/if}


        <div class="s_items">
            <div class="s_title" >
                <div style="width: 68%; display: inline-block;" >
                <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
                {php echo empty($shop)?'':mb_substr($shopname,0,4,'utf-8').'-';}团队总排行{if !empty($notworker)}【{$notworker}个定单无客服】{/if}</div>
                <div style="width: 28%; display: inline-block; text-align: right;" ><a href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$myworker['company'],'op'=>'list','type'=>'all'));}"><span style="color: #198bcb;">查看明细</span></a></div>
            </div>
            <!--  -->
            <table class="lm_table" >
                <thead  style="background-color:#ffffff">
                    <tr>
                        <td style="width: 2%;"></td>
                        <td style="width: 8%;color: #198bcb; text-align: right;">排名</td>
                        <td style="width: 15%;color: #198bcb">团队</td>
                        <td style="width: 10%;"><a {if $paixu!='xfs'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$_P['company'],'paixu'=>'xfs'));}">新粉</a></td>
                        <td style="width: 10%;"><a {if $paixu!='zf'}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$_P['company'],'paixu'=>'zf'));}">转发</a></td>
                        <td style="width: 10%;"><a {if $paixu!='ll'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$_P['company'],'paixu'=>'ll'));}">浏览</a></td>
                        <td style="width: 10%;"><a {if $paixu!=''}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$_P['company'],));}">成交</a></td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td style="width: 10%;"><a {if $paixu!='xx'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$_P['company'],'paixu'=>'xx'));}">线下</a></td>
                        {/if}
                        <td style="width: 10%;"><a {if $paixu!='fee'}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'company'=>$_P['company'],'paixu'=>'fee'));}">实收</a></td>
                        <td style="width: 2%;"></td>
                    </tr>
                </thead>
                <tbody>
                    {loop $team $index $row}
                    <tr>
                        <td> </td>
                        <td style="text-align: right;"><span>{php echo $index+1;}</span></td>
                        <td style="color: #198bcb">{php echo mb_substr($row['name'],0,4,'utf-8');}</td>
                        <td >{$row['newfans']}</td>
                        <td style="color: #198bcb">{$row['forward']}</td>
                        <td >{$row['scansum']}</td>
                        <td style="color: #198bcb">{$row['record']}</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td>{$row['recordxx']}</td>
                        {/if}
                        <td style="color: #198bcb">{$row['fee']}</td>
                        <td> </td>
                    </tr>
                    {if $myworker['level'] != '3'}
                    <tr class="sib">
                        <td colspan="9">
                            <table class="lm_table pd0">
                                {loop $row['list'] $index $item}
                                    <tr>
                                    <td style="width: 2%;"> </td>
                                    <td style="width: 8%;text-align: right;"></td>
                                    <td style="width: 15%;color: #198bcb">{php echo mb_substr($item['name'],0,4,'utf-8');}</td>
                                    <td style="width: 10%;" >{$item['newfans']}</td>
                                    <td style="width: 10%;color: #198bcb">{$item['forward']}</td>
                                    <td style="width: 10%;" >{$item['scansum']}</td>
                                    <td style="width: 10%;color: #198bcb">{$item['record']}</td>
                                    {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                                    <td style="width: 10%;">{$item['recordxx']}</td>
                                    {/if}
                                    <td style="width: 10%;color: #198bcb">{$item['fee']}</td>
                                    <td style="width: 2%;"> </td>
                                    </tr>
                                {/loop}
                            </table>
                        </td>
                    </tr>
                    {/if}
                    {/loop}                 
                </tbody>
            </table>

        </div>



        <div class="s_items">
            <div class="s_title" >
                <div style="width: 68%; display: inline-block;" >
                <img src="{$_G['URL']['WORKER_CSS']}images/title_17.png">
                {php echo empty($shop)?'':mb_substr($shopname,0,4,'utf-8').'-';}个人总排行榜{if !empty($notworker)}【{$notworker}个定单无客服】{/if}</div>
            </div>
            <!--  -->
            <table class="lm_table" >
                <thead  style="background-color:#ffffff">
                    <tr>
                        <td style="width: 2%;"></td>
                        <td style="width: 8%;color: #198bcb; text-align: right;">排名</td>
                        <td style="width: 15%;color: #198bcb">姓名</td>
                        <td style="width: 10%;"><a {if $paixu!='xfs'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_workerrank',array('themeid'=>$themeid,'paixu'=>'xfs'));}">新粉</a></td>
                        <td style="width: 10%;"><a {if $paixu!='zf'}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_workerrank',array('themeid'=>$themeid,'paixu'=>'zf'));}">转发</a></td>
                        <td style="width: 10%;"><a {if $paixu!='ll'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_workerrank',array('themeid'=>$themeid,'paixu'=>'ll'));}">浏览</a></td>
                        <td style="width: 10%;"><a {if $paixu!=''}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_workerrank',array('themeid'=>$themeid,));}">成交</a></td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td style="width: 10%;"><a {if $paixu!='xx'}style="color: #5a5757;"{/if} href="/{php echo createMobileUrl('w_workerrank',array('themeid'=>$themeid,'paixu'=>'xx'));}">线下</a></td>
                        {/if}
                        <td style="width: 10%;"><a {if $paixu!='fee'}style="color: #198bcb;"{/if} href="/{php echo createMobileUrl('w_workerrank',array('themeid'=>$themeid,'paixu'=>'fee'));}">实收</a></td>
                        <td style="width: 2%;"></td>
                    </tr> 
                </thead>
                <tbody>
                    {loop $workerlist $index $row}
                    <tr>
                        <td> </td>
                        <td style="text-align: right;"><span>{php echo $index+1;}</span></td>
                        {if $myworker['level'] != '3'}
                        <td><a style="color: #198bcb;" href="/{php echo createMobileUrl('w_grouprank',array('themeid'=>$themeid,'op'=>'report','uid'=>$row['uid']));}">{php echo mb_substr($row['name'],0,4,'utf-8');}</a></td>
                        {else}
                        <td style="color: #198bcb">{php echo mb_substr($row['name'],0,4,'utf-8');}</td>
                        {/if}
                        <td >{$row['newfans']}</td>
                        <td style="color: #198bcb">{$row['forward']}</td>
                        <td >{$row['scansum']}</td>
                        <td style="color: #198bcb">{$row['record']}</td>
                        {if $config['isxianxia']==1 || $config['isshowxianxia']==1}
                        <td>{$row['recordxx']}</td>
                        {/if}
                        <td style="color: #198bcb">{$row['fee']}</td>
                        <td> </td>
                    </tr>
                    {/loop}                 
                </tbody>
            </table>

        </div>
        <div class="item" style="padding: 0.5rem; line-height: 0.4rem;text-align: center;">
<!--             <p>未出现在排行榜中的，代表当日没有任何宣传。</p>
 -->            <p style="color: #198bcb">实际到帐:付款金额-{$shouxu100}%的手续费-红包发放 </p>
            <p >手续费:凡是通过微信支付的腾讯公司均收取,非我公司收取</p>
            <p>已提现:以实际提现数额为准，此处只做参考</p>
            <!-- <p>点击成交数字可查对应数据</p> -->
        </div>
{/if}
        <script>
		    $('.lm_table tr').click(function(){
		        console.log(1);
		        $(this).next('.sib').toggle();
		    })
            var calendardatetime = new lCalendar();
            calendardatetime.init({
                'trigger': '#demo1',
                'type': 'datetime'
            });
            var calendardatetime2 = new lCalendar();
            calendardatetime2.init({
                'trigger': '#demo2',
                'type': 'datetime'
            });
        </script>
<style>
.pd0 { padding-bottom:0;}
.pd0 tr:last-child td { border-bottom:none;}
.sib { display:none;}
</style>
{include file='yxworker/w_foot_yixuan'}